/*
 * @Author: your name
 * @Date: 2020-03-30 14:38:52
 * @LastEditTime: 2020-06-15 14:07:00
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \v1.0.0\main.js
 */
import Vue from 'vue'
import App from './App'
// import pageFoot from '@/components/page-foot.vue'
// import uLink from '@/components/uLink.vue'
import { http,user } from '@/common/framework' // 全局挂载引入，配置相关在该index.js文件里修改
import cuCustom from '@/static/css/colorui/components/cu-custom.vue'
import kmlcFormSelect from '@/components/kmlc-com/kmlc-form-select/kmlc-form-select.vue'

import kmlcFormDate from '@/components/kmlc-com/kmlc-form-date/kmlc-form-date.vue'
import kmlcFormTime from '@/components/kmlc-com/kmlc-form-time/kmlc-form-time.vue'
import kmlcFormSlider from '@/components/kmlc-com/kmlc-form-slider/kmlc-form-slider.vue'
import kmlcFormDivider from '@/components/kmlc-com/kmlc-form-divider/kmlc-form-divider.vue'
import kmlcFormSwitch from '@/components/kmlc-com/kmlc-form-switch/kmlc-form-switch.vue'

import kmlcFormTreeSelect from '@/components/kmlc-com/kmlc-form-tree-select/kmlc-form-tree-select.vue'
import kmlcFormTreeSelectPerson from '@/components/kmlc-com/kmlc-form-tree-select-person/kmlc-form-tree-select-person.vue'
import kmlcFormTreeSelectDepart from '@/components/kmlc-com/kmlc-form-tree-select-depart/kmlc-form-tree-select-depart.vue'
import kmlcFormUploadFile from '@/components/kmlc-com/kmlc-form-upload-file/kmlc-form-upload-file.vue'
import kmlcFormUploadImg from '@/components/kmlc-com/kmlc-form-upload-img/kmlc-form-upload-img.vue'
import kmlcFormUploadVideo from '@/components/kmlc-com/kmlc-form-upload-video/kmlc-form-upload-video.vue'
import kmlcFormSignature from '@/components/kmlc-com/kmlc-form-signature/kmlc-form-signature.vue'


import kmlcFormCheckbox from '@/components/kmlc-com/kmlc-form-checkbox/kmlc-form-checkbox.vue'
import kmlcFormButton from '@/components/kmlc-com/kmlc-form-button/kmlc-form-button.vue'
import kmlcFormInput from '@/components/kmlc-com/kmlc-form-input/kmlc-form-input.vue'
import kmlcFormNumber from '@/components/kmlc-com/kmlc-form-number/kmlc-form-number.vue'
import kmlcFormTextarea from '@/components/kmlc-com/kmlc-form-textarea/kmlc-form-textarea.vue'
import kmlcFormRate from '@/components/kmlc-com/kmlc-form-rate/kmlc-form-rate.vue'

import "./filter.js";
 
import store from '@/store'

const tui = {
	toast: function(text, duration, success) {
		uni.showToast({
			title: text,
			icon: success ? 'success' : 'none',
			duration: duration || 2000
		})
	},
	constNum: function() {
		const res = uni.getSystemInfoSync();
		return res.platform.toLocaleLowerCase() == "android" ? 300 : 0;
	},
	px: function(num) {
		return uni.upx2px(num) + 'px';
	},
	
}

Vue.prototype.tui = tui

Vue.config.productionTip = false;
Vue.prototype.$http = http;
Vue.prototype.$user=user.getUserInfo();
Vue.prototype.$store = store;

// Vue.prototype.$backgroundAudioData = {
// 	playing: false,
// 	playTime: 0,
// 	formatedPlayTime: '00:00:00'
// }

// Vue.component('page-foot', pageFoot)
Vue.component('cu-custom',cuCustom)
Vue.component('kmlc-form-select',kmlcFormSelect)
Vue.component('kmlc-form-date',kmlcFormDate)
Vue.component('kmlc-form-time',kmlcFormTime)
Vue.component('kmlc-form-slider',kmlcFormSlider)
Vue.component('kmlc-form-divider',kmlcFormDivider)
Vue.component('kmlc-form-switch',kmlcFormSwitch)

Vue.component('kmlc-form-treeSelect',kmlcFormTreeSelect)
Vue.component('kmlc-form-tree-select',kmlcFormTreeSelect)
Vue.component('kmlc-form-treeSelectPerson',kmlcFormTreeSelectPerson)
Vue.component('kmlc-form-tree-select-person',kmlcFormTreeSelectPerson)
Vue.component('kmlc-form-tree-select-depart',kmlcFormTreeSelectDepart)
Vue.component('kmlc-form-treeSelectDepart',kmlcFormTreeSelectDepart)
Vue.component('kmlc-form-uploadFile',kmlcFormUploadFile)
Vue.component('kmlc-form-uploadImg',kmlcFormUploadImg)
Vue.component('kmlc-form-uploadVideo',kmlcFormUploadVideo)
Vue.component('kmlc-form-signature',kmlcFormSignature)
// Vue.component('uLink', uLink) 

/**
 * @liyunlong
 * */
 Vue.component('kmlc-form-checkbox',kmlcFormCheckbox);
 Vue.component('kmlc-form-button',kmlcFormButton);
 Vue.component('kmlc-form-input',kmlcFormInput);
 Vue.component('kmlc-form-number',kmlcFormNumber);
 Vue.component('kmlc-form-textarea',kmlcFormTextarea);
 Vue.component('kmlc-form-rate',kmlcFormRate);
 
App.mpType = 'app'

const app = new Vue({
	store,
    ...App
})
app.$mount()
